package com.ag.dgm.dao;

import java.util.List;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.springframework.stereotype.Repository;

import com.ag.bean.TbPlanRegion;
import com.ag.common.IDUtil;

/**
 * PlanRegion_DAO
 * 
 * @author �˹���
 * 
 */

public class TbPlanRegionDAO extends com.ag.dao.TbPlanRegionDAO {

	@Override
	public List<TbPlanRegion> findAll() {		
		return super.findByA(IDUtil.PRESERVE);
	/*	Configuration config=new Configuration();
		config.configure();
		SessionFactory sessionFactory = config.buildSessionFactory();
		Session session=sessionFactory.getCurrentSession();*/
	}
	
	@Override
	public void delete(TbPlanRegion persistentInstance) {
		persistentInstance.setA(IDUtil.DELETE);
		super.attachDirty(persistentInstance);
	}
}
